#!/usr/bin/env python
# _*_coding:utf-8_*_

"""
@Time : 2022/5/29 17:07
@Author: RunAtWorld
@File: named_tuple_demo.py
"""
from collections import namedtuple
from typing import NamedTuple

Point = namedtuple('Point', ['x', 'y'])
HoughRes = NamedTuple('HoughRes', flag=bool, left=list)
Employee = NamedTuple('Employee', [('name', str), ('id', int)])

if __name__ == '__main__':
    p1 = Point(11, 33)
    print(p1[0], p1[1])
    e1 = Employee('li', 2)
    print(e1)
    hr1 = HoughRes(True, [22, 32, 52])
    print(hr1,hr1.left)
